chore(NODE-7512): add Windows Node Latest to smoke test configuration#4940
chore(NODE-7512): add Windows Node Latest to smoke test configuration#4940RaschidJFR wants to merge 4 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds Windows (windows-2022-latest-large) to the latest Node.js smoke test matrix, which previously only ran on RHEL 8. The generator's regex is broadened and the corresponding generated build variant is committed to config.yml.
Changes:
- Broaden the latest-Node smoke test OS filter to include
windowsin addition torhel. - Add the auto-generated
windows-2022-latest-large-node-latestbuild variant covering all server versions and topologies.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| .evergreen/generate_evergreen_tasks.js | Updates regex to enable latest-Node smoke variant for Windows OS variants. |
| .evergreen/config.yml | Adds the generated Windows Node Latest build variant with full server/topology task coverage. |
…st variant The node-latest smoke test build variant was missing CLIENT_ENCRYPTION from its expansions when clientEncryption is false (as it is on Windows per NODE-3401). run-tests.sh requires the var to be exactly "true" or "false" and exits 1 otherwise, causing all Windows node-latest tasks to fail before any tests run. Align with the regular variant loop by always emitting String(!!clientEncryption) instead of conditionally setting it only when truthy.
On some Windows Evergreen hosts, install-node.sh resolves NODE_ARTIFACTS_PATH to Z: (via realpath following an NTFS junction) but DRIVERS_TOOLS is always set to C: by prepare-shell.sh. When run-tests.sh later calls init-node-and-npm-env.sh via the C: path, NODE_ARTIFACTS_PATH gets recomputed to C: and npm is not found. Fix by persisting the correctly-resolved NODE_ARTIFACTS_PATH to $DRIVERS_TOOLS/.env in install-dependencies.sh, and restoring it in run-tests.sh if npm is inaccessible after init-node-and-npm-env.sh runs.
| # On Windows, install-node.sh resolves SCRIPT_DIR via realpath which may follow an NTFS | ||
| # junction (e.g. C: -> Z:), so NODE_ARTIFACTS_PATH is now correctly set to the real drive. | ||
| # Persist it to .env so that subsequent shells (e.g. run-tests.sh) can recover it even | ||
| # when they call init-node-and-npm-env.sh via the C: DRIVERS_TOOLS path. | ||
| if [ "${OS:-}" = "Windows_NT" ] && [ -n "${NODE_ARTIFACTS_PATH:-}" ]; then | ||
| echo "NODE_ARTIFACTS_PATH=${NODE_ARTIFACTS_PATH}" >> "${DRIVERS_TOOLS}/.env" | ||
| fi | ||
| _INSTALL_DEPS_NODE_ARTIFACTS_PATH="${NODE_ARTIFACTS_PATH:-}" | ||
|
|
There was a problem hiding this comment.
Strictly speaking this change is not covered by the ticket AC, however I've discovered that tests are flaky some particular windows hosts (like this one), so I decided to include fix here. Please let me know if you prefer more formal process of ticket->separate PR, otherwise I would update PR description and ticket AC.
141fd97 to
cd4f890
Compare
| NODE_LTS_VERSION: latest | ||
| CLIENT_ENCRYPTION: true | ||
| CLIENT_ENCRYPTION: 'true' | ||
| TEST_CSFLE: 'true' |
There was a problem hiding this comment.
Does the addition of TEST_CSFLE here change behavior? Can we avoid unnecessary config updates?
Description
Summary of Changes
This PR adds Windows testing for the latest Node.js version (currently 25.x) to the smoke test configuration. Previously, latest Node.js testing was only performed on RHEL 8.
Changes:
os.match(/^(rhel|windows)/)windows-2022-latest-large-node-latestin .evergreen/config.yml with comprehensive test coverage across all MongoDB server versions (4.2-latest) and topologiesWhat is the motivation for this change?
See Jira ticket NODE-7512.
Double check the following
npm run check:lint)type(NODE-xxxx)[!]: descriptionfeat(NODE-1234)!: rewriting everything in coffeescript